package com.xce.account.service.impl;

import com.xce.account.entity.Account;
import com.xce.account.mapper.AccountMapper;
import com.xce.account.service.AccountService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lld
 * @since 2025-07-09
 */
@Service
public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> implements AccountService {

    @Autowired
    private AccountMapper accountMapper;

    @Override
    @Transactional
    public void debit(String userId, int money) {

        accountMapper.debit(userId, money);
    }
}
